package com.time.sky.controller;

import com.time.sky.entity.Owner;
import com.time.sky.mapper.OwnerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OwnerController {

    @Autowired
    OwnerMapper ownerMapper;

    @CrossOrigin
    @RequestMapping("/owner/selectAll")
    public List<Owner> findAll(){
        List<Owner> all = ownerMapper.findAll();
        return all;
    }
}
